<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>[%$softtitle%]</title>
<link href="templates/css/baselist.css" rel="stylesheet" type="text/css" />
<link href="templates/css/all.css" rel="stylesheet" type="text/css" />
<link href="templates/css/formdiv.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/control.js"></script>
<script type="text/javascript" src="js/form.js"></script>
<script type="text/javascript" src="../public/tinyMCE/jquery.tinymce.js"></script>
<script type="text/javascript" src="js/initedit.js"></script>
<script type="text/javascript">

	var resizewindow= null;

	window.onresize = function(){
		var h = $(window).height();
		if(resizewindow!=h){
			sizewindow();
			resizewindow=h;
		}
	}

	function sizewindow(){
		var h = $(window).height();
		if(document.getElementById("mainbodybottonauto")){
			$('.managebottonadd').css({height:h-40});
		}
	}
	var formmessmain_js_content_mess  = "[%$ST.formmessmain_js_content_mess%]";
	var formmessmain_js_add_ok = "[%$ST.formmessmain_js_add_ok%]";
	var formmessmain_js_add_no = "[%$ST.formmessmain_js_add_no%]";
	var iframename = "[%$iframename%]";
	$(document).ready(function(){
		var h = '[%$iframeheightwindow%]';
		$('.managebottonadd').css({height:h-40});
		editsimpleshow_height("#content");
		var options = {
			beforeSubmit: formverify,
			success:saveResponse,
			resetForm: false
		}
		$('#forumedit').submit(function() {
			$(this).ajaxSubmit(options);
			return false;
		});
	})




	function formverify(formData) {
		for (var i=0; i< formData.length; i++){
			if (formData[i].name == "content"){
				formData[i].value=tinyMCE.get('content').getContent()
			}
		}
		var queryString = $.param(formData);
		var get=urlarray(queryString);
		if(get['content']==''){
			alert(formmessmain_js_content_mess);
			return false;
		}
		parent.windowsdig('Loading','iframe:index.php?archive=management&action=load','400px','180px','iframe',false);
	}
	function saveResponse(options){
		parent.closeifram();
		if (options=='true'){
			parent.frames[iframename].refresh('selectform','selectall','check_all');
			alert(formmessmain_js_add_ok);
		}else{
			alert(formmessmain_js_add_no);
		}
		parent.onaletdoc()
	}
</script>
</head>

<body>
<form name="forumedit" id="forumedit" method="post" action="index.php?archive=bbsmain&action=save">

<div id="mainbodybottonauto" class="managebottonadd">
	<div class="maindobycontent">
		<div class="suggestion">
			<span class="sugicon"><span class="strong colorgorning2">[%$ST.position_title%]</span><span class="colorgorningage">[%$ST.forummain_edit_mess_copy%]“<u>[%$read.title%]</u>”</span></span>
		</div>
		<div class="manageeditdiv">
			<div class="maneditcontent">
			<table class="formtable">
				<tr class="trstyle2">
					<td class="trtitle01">[%$ST.forummain_add_formgroupname%]</td>
					<td class="trtitle02">[%$read.title%]</td>
				</tr>
				<tr class="trstyle2">
					<td class="trtitle01">[%$ST.forummain_add_content%]</td>
					<td class="trtitle02">[%$read.content%]</td>
				</tr>
				<tr class="trstyle2">
					<td class="trtitle011">[%$ST.forummain_add_content_re%]</td>
					<td class="trtitle02"><textarea name="content" id="content" class="smallInput"></textarea></td>
				</tr>
				<tr>
					<td class="trtitle03" colspan="2">[%$ST.forummain_add_other_mess%]</td>
				</tr>
				[%if $member.username!=''%]
				<tr class="trstyle2">
					<td class="trtitle01">[%$ST.enquirymain_add_userid%]</td>
					<td class="trtitle02">[%$member.username%]  [%if @this->powercheck('member','memberedit')==true %]<a class="tabclicklink" onclick="javascript:parent.onbotton('[%$ST.viewmember_botton%]','index.php?archive=membermain&action=memberedit&userid=[%$member.userid%]&type=edit&freshid='+Math.random()+'&iframename='+self.frameElement.getAttribute('name'),true,'memberedit[%$member.userid%]',self.frameElement.getAttribute('name'));" id="memberedit[%$member.userid%]" href="#body" title="[%$member.username%]" hidefocus="true">[%$ST.viewmember_botton%]</a> [%/if%]</td>
				</tr>
				[%/if%]
				<tr class="trstyle2">
					<td class="trtitle01">[%$ST.forummain_add_addtime%]</td>
					<td class="trtitle02">[%$read.addtime|timeformat(3)%]</td>
				</tr>
				<tr class="trstyle2">
					<td class="trtitle01">[%$ST.forummain_add_click%]</td>
					<td class="trtitle02">[%$read.click%]</td>
				</tr>
			</table>
			</div>
		</div>
	</div>
</div>
<div id="downbotton">
	<div id="subbotton">
		<table border="0" width="100%">
			<tr>
				<td id="right"><input type="submit" id="messsubmitbotton" name="Submit" value="[%$ST.botton_remess%]" class="buttonface" /></td>
				<td id="left" class="padding-left5"><input type="button" name="cancel" onClick="javascript:parent.onaletdoc();" value="[%$ST.botton_remess_reset%]" class="buttonface" /></td>
			</tr>
		</table>
	</div>
</div>
<input type="hidden" name="inputclass" value="add">
<input type="hidden" name="bid" value="[%$read.bid%]">
<input type="hidden" name="lng" value="[%$read.lng%]">
<input type="hidden" name="btid" value="[%$read.btid%]">
<input type="hidden" name="reemail" value="[%$read.email%]">
<input type="hidden" name="title" value="Re:[%$read.title%]"> 
</form>
</body>

</html>